package cn.ainit.bs.report;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.ainit.bs.repList.entity.RepListDataStore;
import cn.ainit.bs.repList.entity.RepViewType;
import cn.ainit.bs.report.entity.ReportBar;
import cn.ainit.bs.report.entity.ReportPie;
import cn.ainit.sys.query.entity.QueryJson;
@Service("reportServiceImpl")
public class ReportServiceImpl implements ReportService {
	ReportDao reportDao;
	
	@Resource
	public void setReportDao(ReportDao reportDao) {
		this.reportDao = reportDao;
	}

	@Override
	public ReportBar findRCOById(String reId) throws Exception {
		return reportDao.findRCOById(reId);
	}
	
	@Override
	public List queryRpData(String sql, Integer xshowCount) throws Exception {
		return reportDao.queryRpData(sql,xshowCount);
	}
	
	@Override
	public RepListDataStore findByDsId(String dsId) throws Exception{
		return reportDao.findByDsId(dsId);
	}

	@Override
	public List getReportButns(String dsId) throws Exception {
		return reportDao.getReportButns(dsId);
	}

	@Override
	public List getReportCols(String dsId, String type, String flag)
			throws Exception {
		return reportDao.getReportCols(dsId, type, flag);
	}

	@Override
	public QueryJson queryRowsBySqlPagination(String sqlText, int cpage,
			int rows) throws Exception {
		return reportDao.queryRowsBySqlPagination(sqlText, cpage, rows);
	}

	@Override
	public List getReportCondition(String dsId) throws Exception {
		return reportDao.getReportCondition(dsId);
	}

	
	@Override
	public List getReportCol(String dsId, String config, String type,
			String flag) throws Exception {
		return reportDao.getReportCol(dsId,config,type,flag);
	}

	@Override
	public List getCommonData(String dsId) throws Exception {
		return reportDao.getCommonData(dsId);
	}

	@Override
	public RepViewType getViewChoice(String dsId, String viewName)
			throws Exception {
		return reportDao.getViewChoice(dsId,viewName);
	}
	

	@Override
	public List loadRresult(StringBuffer sql, Integer currentPage,
			Integer pageSize) throws Exception {
		return reportDao.loadRresult(sql,currentPage,pageSize);
	}
	

	@Override
	public ReportBar findBarByReId(String reid) throws Exception {
		return reportDao.findBarByReId(reid);
	}
	
	@Override
	public ReportPie findPieByReId(String reid) throws Exception {
		return reportDao.findPieByReId(reid);
	}
}
